﻿using Autofac;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Module = Autofac.Module;

namespace Shard
{

    /// <summary>
    /// Autofac注册服务类
    /// </summary>
    public class AutofacModuleRegister : Module
    {
        protected override void Load(ContainerBuilder builder)
        {
            builder.RegisterAssemblyTypes(
                   Assembly.Load("Base.Service"),
<<<<<<< HEAD
                    Assembly.Load("Base.Contracts")

               )
           .Where(a => a.Name.EndsWith("Service")).AsImplementedInterfaces();        
        }
    }
}
